Skip to content

Conversation

@brichet
Copy link
Collaborator

@brichet brichet commented Nov 20, 2025

This PR restore the use of TooltippedIconButton in chat toolbars (input, message and code), that has been partially removed in #298.

It aligns the tooltipped buttons style to the recent changes in button UI brought by #298.

This will help homogenize the buttons in the chat itself, but also for extension adding buttons to the input toolbar.

Related to #303

Could help with jupyterlite/ai#218

cc. @jtpio @ellisonbg

@github-actions
Copy link
Contributor

Binder 👈 Launch a Binder on branch brichet/jupyter-chat/tooltipped_button

@brichet brichet added the enhancement New feature or request label Nov 20, 2025
@brichet brichet marked this pull request as ready for review November 20, 2025 16:45
Copy link
Member

@jtpio jtpio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @brichet!

Looks good, left a couple of minor comments.

props: TooltippedIconButtonProps
): JSX.Element {
// Override the default icon font size from 'medium' to 'small'
props.children.props.fontSize = props.fontSize ?? 'small';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the props be directly mutated? Wondering if there could be side-effects to this.

Copy link
Collaborator Author

@brichet brichet Dec 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIU, if one wants to use a bigger button (iconButtonProps.size = 'large'), it makes probably sense to be able to set the font size too.

@brichet
Copy link
Collaborator Author

brichet commented Dec 8, 2025

Thanks for the review @jtpio

@brichet brichet merged commit 36068a4 into jupyterlab:main Dec 8, 2025
12 checks passed
@brichet brichet deleted the tooltipped_button branch December 8, 2025 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants